メインコンテンツまでスキップ
バージョン: DAI 6.5

Running the Agent in Command Line Mode

You can configure and run the Eggplant DAI Agent from the command line, without the interface.

  1. From the command prompt, navigate to the agent directory. For example:

    • For Windows: C:\Program Files (x86)\eggplantAIagent\
    • For Linux: $HOME/eggplant
  2. Run the agent executable, and add the appropriate arguments:

    • For Windows: eggplantAIagentCMD.exe [flags]
    • For Linux: ./eggplantAIagentCMD [flags]
ノート

Either add arguments or environment variables from the tables below.

Command-Line Arguments and Environment Variables

ArgumentsEnvironment VariablesDescription
-h,
--help
Show the help message and exit.
-s SERVER,
--server SERVER,
--host-url
DAI_HOST_URLThe Eggplant DAI server that you connect to, e.g. server.mycompany.com. This maps to dai_host_url in your environment settings (.ini) file.

Default: eggplantai.testplant.com

Note: In DAI 6.0 and later, the whole URL and protocol are passed in, i.e. https://server.company.com. No additional protocol flag, e.g. --ssl is required.
-p PORT,
--port PORT
EGGDRIVE_PORTPort to run Eggplant Functional drive on.

Default: 5400
--env-id (new)DAI_EXEC_ENVID of the execution environment. Use this flag in conjunction with --server/host-url to select the appropriate section of the environment settings (.ini) file by looking up its properties in the command line interface.
--token-url (new)DAI_TOKEN_URLFully qualified endpoint url: https://{host}/auth/realms/\{realm\}/protocol/openid-connect/token of the identity access management server that you connect to in order to generate an access key for the agent. The token is used to authenticate the agent against the DAI server (--server/host-url) on log in.
-f FILE,
-- file FILE
DAI_AGENT_CONFIG_FILELocation of the environment settings (.ini) file. Files that contain only one section, i.e. the details for a single execution environment, are used by default. For files that contain multiple sections, use --server SERVER or --host-url to look up each section by its properties.

Default: $HOME/.eggplantDAI.ini or C:\Users\{user}\.eggplantDAI.ini.
-e DRIVEEXEC,
--driveExec DRIVEEXEC
EGGDRIVE_EXECLocation of the Eggplant Functional drive executable.

Default: C:/Program Files/eggPlant/eggplant.bat
-n NAME,
--name NAME
DAI_EXEC_ENV_NAMEName for the agent connection used in Eggplant DAI settings. If unspecified, an IP address will be used.
--epfgui,
--no-epfgui
Start, or don't start the Eggplant Functional GUI.

Default: --no-epfgui
--no-start-epfDon't start Eggplant Functional; expect it to be already running on the specified port.
--debugRun the agent in debug mode (provides more messaging).
--design-modeConnect to the server as a Design execution environment. By default, this is set to Run mode.
--suite-root-folder SUITEROOTFOLDERFull path to a folder. Eggplant Functional suites will be uploaded and downloaded as subfolders of the specified root folder.

Using Variables for Client ID and Secret Pairs (Advanced)

For additional security, you can use environment variables to store the client ID and secret pairs used to authorize each agent, and make them available to the agent from the command line. Before you do this, you need to know some details about the environment settings file.

Environment Settings File

When you add an access key (.ini file) to an agent, the authorization details for a specific execution environment are added to the environment settings (.ini) file. For every additional access key that is added to the agent, a new set, or block of details, is added to the environment settings file. For example:

Block for First Execution Environment
[https://test.dai.webperfdev.com^194]
host_url = https://test.dai.webperfdev.com
token_url = https://test.dai.webperfdev.com/auth/realms/test600/protocol/openid-connect/token
env_id = 194
env_name = ExecEnv
agent_client_id = client:dai:agent:194:dai_agent
agent_client_secret = d4064f58-e8a1-4d45-9e70-9a74695438d3
epf_client_id = client:dai:agent:194:fe_drive
epf_client_secret = 90e56eaa-d779-43d4-b5d8-976da7ced0fe
Block for Second Execution Environment
[https://test.dai.webperfdev.com^1520]
host_url = https://test.dai.webperfdev.com
token_url = https://test.dai.webperfdev.com/auth/realms/helm6001/protocol/openid-connect/token
env_id = 1520
env_name = EnvTest
agent_client_id = client:dai:agent:1520:dai_agent
agent_client_secret = 9a639791-aa4e-4d47-94af-1793968855a6
epf_client_id = client:dai:agent:1520:fe_drive
epf_client_secret = 5f2dfe64-4d87-458c-9f5c-59257b8b7e93

By default, the environment settings file is saved to $HOME/.eggplantDAI.ini or C:\Users\{user}\.eggplantDAI.ini.

ノート

If required, you can add blocks of authorization details manually to the environment settings file, rather than through the interface. For the agent to run, the file must contain at least one block of details.

Environment Variables for Client ID and Secret Pairs

Environment VariablesDescription
DAI_AGENT_CLIENT_IDThe agent_client_id in the environment settings (.ini) file, e.g. client:dai:agent:1:dai_agent.
DAI_AGENT_CLIENT_SECRETThe agent_client_secret in the environment settings (.ini) file, e.g. 28db1c87-487c-4165-a90d-44000960175b.
DAI_EPF_CLIENT_IDThe epf_client_id in the environment settings (.ini) file, e.g. client:dai:agent:194:fe_drive.
DAI_EPF_CLIENT_SECRETThe epf_client_secret in the environment settings file (.ini) file, e.g. client:dai:agent:194:fe_drive.